﻿{% load filter %}
{% extends '2base.html' %}
{% block title %}
<title>Wow Dkp Engine Forum</title>
<script type="text/javascript" src="/static/javascript/audio-player.js"></script>
<link rel="stylesheet" href="/static/css/code.css" type="text/css"/>

<script type="text/javascript">  
AudioPlayer.setup("/static/javascript/player.swf", {
	width: 290
});
</script>
{% endblock %}
{% block headline %}
{% endblock %}
{% block secondmenu %}
{% include 'second_menu.html'%}
{% endblock %}
{% block content %}
	<h2 class="page-title" >{{ topic.title }}</h2>
	<div class="topic">
		<div class="topic-info">
			<div class="topic-portrait">
				{% if topic.author.thumbnail %}
					<img src="/member/thumbnail/{{ topic.author.key.id }}" style="border:2px solid {% ifequal topic.author.gender 'female' %} orange {% endifequal %} {% ifequal topic.author.gender 'male' %} #b5edbc {% endifequal %}"/>
				{% else %}
					{% if topic.author.player %}
						<img src="/static/images/wow/portraits/{{topic.author.player.player_sex}}-{{topic.author.player.player_race}}-{{topic.author.player.player_class}}.gif" width="32px" height="32px;" style="border:2px solid {{ topic.author.player.player_class|classcolor }}" />
					{% endif %}
				{% endif %}
			</div>
			<div class="topic-body">
				<div class="topic-meta">
					<b><a href="/pub/players/{{topic.author.player.player_name}}" >{{ topic.author.username }}</a></b> @ <em>{{ topic.post_on|timezone:8|date:"Y-m-d H:i:s" }}</em> @ {{ topic.author.summary}}
				</div>
				<div class="topic-content">
				{{ topic_content }}
				</div>
			</div>
		</div>
	</div>
	<br />
	<br />
	{% if author %}
	<a href="/forum/topic/edit/{{ topic.key.id }}" title="edit" >{{ multi_language.fa_forum_view_lang_edit }}</a> <a href="/forum/topic/del/{{ topic.key.id }}" title="delete" >{{ multi_language.fa_forum_view_lang_delete }}</a> 
	{% endif %}
	<br />
	<br />
	<br />
	<div class="replies">
		{% for reply in replies %}
		<div class="reply">
			<div class="reply-portrait">
				{% if reply.author.thumbnail %}
					<img src="/member/thumbnail/{{ reply.author.key.id }}" style="border:2px solid {% ifequal reply.author.gender 'female' %} orange {% endifequal %} {% ifequal reply.author.gender 'male' %} #b5edbc {% endifequal %}" />
				{% else %}
					{% if reply.author.player %}
					<img src="/static/images/wow/portraits/{{reply.author.player.player_sex}}-{{reply.author.player.player_race}}-{{reply.author.player.player_class}}.gif" width="48px" height="48px;" style="border:2px solid {{ reply.author.player.player_class|classcolor }}" />
					{% endif %}
				{% endif %}
			</div>
			<div class="reply-body">
				<div class="reply-meta">
					{{ multi_language.fa_forum_view_lang_by }} {% if reply.author.player %}<b><a href="/pub/players/{{ reply.author.player.player_name }}">{{ reply.author.username }}</a></b>{% else %}<b><a href="{{ reply.author.homepage }}">{{ reply.author.username }}</a></b>{% endif %} @ <em>{{ reply.post_on|timezone:8|date:"Y-m-d H:i:s" }}</em> @ {{ reply.author.summary }}
					{% ifequal reply.author.user user %}<a href="/forum/reply/del/{{ reply.key.id }}" title="delete">{{ multi_language.fa_forum_view_lang_delete }}</a>{% endifequal %}
				</div>
				<div class="reply-content">
					{{ reply.content }}
				</div>
			</div>
		</div>
		{% endfor %}
	</div>
	{% if user %}
		<form method="post" action=".">
			<textarea cols="70" rows="5" name="content"></textarea>
			<br />
			<input type="submit" name="submit" value="{{ multi_language.fa_forum_view_lang_submit }}" />
		</form>
	{% else %}
		<div><a href="{{ greeting }}">请使用谷歌账户登入后发言</a></div>
	{% endif %}
{% endblock%}
{% block siderbar %}
{% include 'forumSiderbar.html' %}
{% endblock%}